Ext.define("SHApp.EmployeeInfo.AddressInfo.Form", {
    extend: "BLBTSystem.Form",
    submitUrl: "api/addressinfo?format=json",
    winWidth: 650,
    winHeight: 215,
    initComponent: function () {
        Ext.apply(this);
        this.createItems();
        this.callParent(arguments);
    },
    createItems: function () {
        var me = this;
        this.items = [{
            width: 300,
            border: false,
            bodyStyle: "background:#DFE9F6",
            layout: { type: "vbox", align: "stretch" },
            items: [{
                xtype: "textfield",
                fieldLabel: "ID",
                name: "Id",
                hidden: true
            }, Ext.create("BLBTSystem.CmbYesNo", {
                fieldLabel: "<span style='color:red'>*</span>地址类型",
                fields: ["text"],
                data: [["家庭地址"], ["工作地址"], ["公司地址"], ["邮寄地址"]],
                valueField: "text",
                displayField: "text",
                name: "AddressType",
                maxLength: 50,
                allowBlank: false,
                blankText: "请选择地址类型!"
            }), {
                fieldLabel: "<span style='color:red'>*</span>国家",
                allowBlank: false,
                blankText: "请输入国家!",
                xtype: "textfield",
                name: "Nation",
                maxLength: 50
            }, {
                fieldLabel: "<span style='color:red'>*</span>省份",
                allowBlank: false,
                blankText: "请输入省份!",
                xtype: "textfield",
                name: "Province",
                maxLength: 50
            }, {
                fieldLabel: "<span style='color:red'>*</span>市",
                allowBlank: false,
                blankText: "请输入市!",
                xtype: "textfield",
                name: "City",
                maxLength: 50
            }, {
                fieldLabel: "<span style='color:red'>*</span>客户Id",
                allowBlank: false,
                blankText: "请输入客户Id!",
                xtype: "textfield",
                name: "CustomerId",
                maxLength: 50,
                hidden: true
            }, {
                fieldLabel: "<span style='color:red'>*</span>员工Id",
                allowBlank: false,
                blankText: "请输入员工Id!",
                xtype: "textfield",
                name: "EmpId",
                maxLength: 50,
                hidden: true
            }]
        }, {
            width: 300,
            border: false,
            bodyStyle: "background:#DFE9F6",
            layout: { type: "vbox", align: "stretch" },
            items: [{
                fieldLabel: "<span style='color:red'>*</span>区县",
                allowBlank: false,
                blankText: "请输入区县!",
                xtype: "textfield",
                name: "County",
                maxLength: 50
            }, {
                fieldLabel: "<span style='color:red'>*</span>街道",
                allowBlank: false,
                blankText: "请输入街道!",
                xtype: "textfield",
                name: "Street",
                maxLength: 50
            }, {
                fieldLabel: "邮政编码",
                xtype: "textfield",
                name: "PostalCode",
                maxLength: 6,
                enforceMaxLength: true
            }, {
                fieldLabel: "其他",
                xtype: "textfield",
                name: "Other",
                maxLength: 50
            }, {
                fieldLabel: "<span style='color:red'>*</span>客户名称",
                allowBlank: false,
                blankText: "请输入客户名称!",
                xtype: "textfield",
                name: "CustomerName",
                maxLength: 50,
                hidden: true
            }, {
                fieldLabel: "<span style='color:red'>*</span>员工姓名",
                allowBlank: false,
                blankText: "请输入员工姓名!",
                xtype: "textfield",
                name: "EmpName",
                maxLength: 50,
                hidden: true
            }, {
                xtype: "hiddenfield",
                name: "AddressCategory"
            }]
        }
		];
    }
})